package com.huanf.controller;

import com.huanf.service.DemoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 35238
 * 功能:
 * 时间: 2023-12-29 21:33
 */
@RestController
public class DemoController {

    @DubboReference//在yml文件配置了注册中心的话，@DubboReference就不需要加url属性
    public DemoService demoService;

    @GetMapping("/demo") //浏览器访问 http://localhost:8191/demo
    public String demo(){
        demoService.login("张三");
        return "我是comsumer模块，我调用了provider模块的login方法";
    }
}
